﻿<phone:PhoneApplicationPage 
    x:Class="Omnia.Wallet.Views.CaseAddView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewmodel="clr-namespace:Omnia.ViewModels;assembly=Omnia.ViewModels"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:UX="clr-namespace:Omnia.UX;assembly=Omnia.UX"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480">

    
    <Grid x:Name="LayoutRoot" Tag="{Binding Path=BackUri, Mode=TwoWay}">
        <Grid.DataContext>
            <viewmodel:CaseAddViewModel/>
        </Grid.DataContext>
    	<Grid.Background>
    		<ImageBrush Stretch="{Binding GlobalSettings.BackgroundImageStretch}" ImageSource="{Binding BackgroundImageSource, Mode=OneWay}"/>
    	</Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,12">
            <TextBlock Text="{StaticResource IDS_PAGE_TITLE}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="{StaticResource IDS_PAGE_HEADER_CASE_ADD}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <ScrollViewer>
                <StackPanel>
                    <TextBlock Text="{StaticResource IDS_LABEL_CASE_TITLE}" 
                               Style="{StaticResource PhoneTextSubtleStyle}" />
                    <TextBox Text="{Binding CaseItemToAdd.Title, Mode=TwoWay}"/>
                    <TextBlock Text="{StaticResource IDS_LABEL_CASE_PLACE}" 
                               Style="{StaticResource PhoneTextSubtleStyle}" />
                    <TextBox Text="{Binding CaseItemToAdd.Place, Mode=TwoWay}"/>
                    <toolkit:DatePicker Header="{StaticResource IDS_LABEL_CASE_STARTDATE}" 
                                        Value="{Binding CaseItemToAdd.StartDate, Mode=TwoWay}"/>
                    <TextBlock Text="{StaticResource IDS_LABEL_CASE_DESCRIPTION}" 
                               Style="{StaticResource PhoneTextSubtleStyle}" />
                    <TextBox AcceptsReturn="True" 
                             Text="{Binding CaseItemToAdd.Description, Mode=TwoWay}"/>
                </StackPanel>
            </ScrollViewer>

            <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right">
                <UX:UXPathButton  Margin="12" 
                                  IconPath="{StaticResource PATH_ICON_SUBMIT}" Padding="10"
                                  Command="{Binding AddCaseCommand}"/>
                <UX:UXPathButton  Margin="12" Uri="/Views/CasesView.xaml"
                                  IconPath="{StaticResource PATH_ICON_PREVIOUS}"/>
            </StackPanel>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>
